package com.xwdeshj.entity;

import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

/**
 *  27、城市管理信息
 */
@Entity(name = "xw_cityinfo")
public class XwCityinfo {
    /**
     * 城市id
     */
    @Column(name = "city_Id")
    private Integer cityId;

    /**
     * 城市加密id
     */
    @Column(name = "city_encryptId")
    private String cityEncryptid;

    /**
     * 一级城市
     */
    @Column(name = "city_name")
    private String cityName;

    /**
     * 二级区县
     */
    @Column(name = "city_district_name")
    private String cityDistrictName;

    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "city_updatetime")
    private Date cityUpdatetime;

    /**
     * 提交时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "city_createtime")
    private Date cityCreatetime;

    public XwCityinfo(){

    }

    public XwCityinfo(String cityEncryptid, String cityName, String cityDistrictName, Date cityUpdatetime, Date cityCreatetime) {
        this.cityEncryptid = cityEncryptid;
        this.cityName = cityName;
        this.cityDistrictName = cityDistrictName;
        this.cityUpdatetime = cityUpdatetime;
        this.cityCreatetime = cityCreatetime;
    }

    /**
     * 获取城市id
     *
     * @return city_Id - 城市id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getCityId() {
        return cityId;
    }

    /**
     * 设置城市id
     *
     * @param cityId 城市id
     */
    public void setCityId(Integer cityId) {
        this.cityId = cityId;
    }

    /**
     * 获取城市加密id
     *
     * @return city_encryptId - 城市加密id
     */
    public String getCityEncryptid() {
        return cityEncryptid;
    }

    /**
     * 设置城市加密id
     *
     * @param cityEncryptid 城市加密id
     */
    public void setCityEncryptid(String cityEncryptid) {
        this.cityEncryptid = cityEncryptid;
    }

    /**
     * 获取一级城市
     *
     * @return city_name - 一级城市
     */
    public String getCityName() {
        return cityName;
    }

    /**
     * 设置一级城市
     *
     * @param cityName 一级城市
     */
    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    /**
     * 获取二级区县
     *
     * @return city_district_name - 二级区县
     */
    public String getCityDistrictName() {
        return cityDistrictName;
    }

    /**
     * 设置二级区县
     *
     * @param cityDistrictName 二级区县
     */
    public void setCityDistrictName(String cityDistrictName) {
        this.cityDistrictName = cityDistrictName;
    }

    /**
     * 获取更新时间
     *
     * @return city_updatetime - 更新时间
     */
    public Date getCityUpdatetime() {
        return cityUpdatetime;
    }

    /**
     * 设置更新时间
     *
     * @param cityUpdatetime 更新时间
     */
    public void setCityUpdatetime(Date cityUpdatetime) {
        this.cityUpdatetime = cityUpdatetime;
    }

    /**
     * 获取提交时间
     *
     * @return city_createtime - 提交时间
     */
    public Date getCityCreatetime() {
        return cityCreatetime;
    }

    /**
     * 设置提交时间
     *
     * @param cityCreatetime 提交时间
     */
    public void setCityCreatetime(Date cityCreatetime) {
        this.cityCreatetime = cityCreatetime;
    }

    @Override
    public String toString() {
        return "XwCityinfo{" +
                "cityId=" + cityId +
                ", cityEncryptid='" + cityEncryptid + '\'' +
                ", cityName='" + cityName + '\'' +
                ", cityDistrictName='" + cityDistrictName + '\'' +
                ", cityUpdatetime=" + cityUpdatetime +
                ", cityCreatetime=" + cityCreatetime +
                '}';
    }
}